#ifndef PLUGIN_H
#define PLUGIN_H

#include "interface.h"
#include <QDebug>
#include <QTimer>

class Plugin:public Interface//你可以选择来自class继承的访问控制,这里我选择Public
{
    Q_OBJECT
#if QT_VERSION > 0x050000 //宏定义到Qt5
    Q_PLUGIN_METADATA(IID "FunNing.Demo.Plugin")//参数1:默认搭配；参数2:源信息
    //"FunNing.Demo.Plugin"用于dll判断身份标识，尽量做成插件标识，
    //Q_PLUGIN_METADATA(IID "FunNing.Demo.Plugin" FILE "PluginInfor.json")
    //参数1:默认搭配；参数2:源信息；参数3：默认搭配；参数4：其它源信息文件,一般做成qrc文件用相对路径指向文件

    Q_INTERFACES(Interface)//接口声明
#endif // QT_VERSION < 0x050000
//注:宏注册信息一定要写到类里面，不然加载插件提示找不到METADATA

public:
    void UsFunction() Q_DECL_OVERRIDE;
    void Init() Q_DECL_OVERRIDE;

private slots:
    void UsPrivateSlot() Q_DECL_OVERRIDE;

public slots:
    void UsPublicSlot() Q_DECL_OVERRIDE;

private:
    QTimer* m_pTimer = new QTimer();
};

#endif // PLUGIN_H
